package com.gregbugaj.nscaffold.type;

import static org.junit.Assert.*;

import org.hibernate.type.StringType;
import org.junit.Before;
import org.junit.Test;

import com.gregbugaj.nscaffold.exception.RepositoryException;


public class TypeResolverRegistryTester {

	private TypeResolverRegistry registry;
	@Before
	public void setup(){
		registry=new TypeResolverRegistry();
	}

	@Test
	public void testResolvingCorrectType(){
		try {
			TypeResolver<?> resolver=registry.lookup(StringType.class);
			assertNotNull(resolver);
			assertEquals(HibernateTypeResolver.class, resolver.getClass());
		} catch (RepositoryException e) {
			e.printStackTrace();
		}

	}

}
